Skip to content

Reject k-mer matches before their indexed string - #97

Merged
jermp merged 9 commits into
jermp:masterfrom
ratschlab:upstream/encoded-boundary-check
Nov 27, 2026
Merged

jermp merged 9 commits into
jermp:masterfrom
ratschlab:upstream/encoded-boundary-check

Conversation

@adamant-pwn

Copy link
Copy Markdown
Contributor

Encoded-offset lookup can accept a candidate that starts before its associated string. With records CGGGGGC, GTGTATT, CGTCAGA, and CCACGAA, k=5 and m=1, lookup reports GACGA as present although neither it nor its reverse complement occurs in any record.

Check the lower string boundary after decoding the candidate offset, alongside the existing upper-bound check. This prevents false membership results while retaining valid matches.

@jermp
jermp merged commit f5fbc7b into jermp:master Nov 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants